package com.compass.doctor.ui.prescription.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.compass.doctor.R
import com.compass.doctor.databinding.LayoutPatientMenuTagItemBinding
import com.compass.doctor.databinding.LayoutPrescriptionDialnoseItemBinding
import com.compass.framework.adapter.BaseBindViewHolder
import com.compass.framework.adapter.BaseRecyclerViewAdapter
import com.compass.framework.model.Diagnosis
import com.compass.framework.model.ScreenTag
import com.compass.framework.utils.getColorFromResource

/**
 * Description： 处方诊断adapter
 * Date:2023/12/27 15:38
 */
class PrescriptionDiagnoseAdapter : BaseRecyclerViewAdapter<Diagnosis, LayoutPrescriptionDialnoseItemBinding>() {
    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutPrescriptionDialnoseItemBinding>,
        item: Diagnosis?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {
            tvDiagnosisName.text = item.name
        }
    }

    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutPrescriptionDialnoseItemBinding {
        return LayoutPrescriptionDialnoseItemBinding.inflate(layoutInflater, parent, false)
    }

}